package com.petrochina.cloudconfig.util;

import com.jcraft.jsch.SftpProgressMonitor;

public class MyProgressMonitor implements SftpProgressMonitor {

    private long transfered;

    @Override
    public void init(int i, String s, String s1, long l) {
        System.out.println("file upload begin");
    }

    @Override
    public boolean count(long l) {
        transfered = transfered + l;
        System.out.println("Currently transferred total size: " + transfered + " bytes");
        return  true;
    }

    @Override
    public void end() {
        System.out.println("file upload end");
    }
}
